<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>
手机号码<input type="text" id="mobile" />验证码<input type="text" id="code" />密码<input type="password" id="password" />
<button id="sendCode" onclick="sendCode()">发送验证码</button>
<button id="authCode" onclick="authCode()">验证验证码</button>
<button id="submit" onclick="submit()">注册</button>
<script type="text/javascript" src="#(contextPath)/assets/front/web/script/jquery.js"></script>
<script type="text/javascript">
    function authCode(){
        $.ajax({
            url:"#(contextPath)/passport/authCode",
            type:"post",
            data:{"mobile":$("#mobile").val(),"authCode":"111111"},
            dataType:"json",
            success:function(data){
                console.log(data);
            }
        })
    }
    function sendCode(){
        $.ajax({
            url:"#(contextPath)/passport/sendAuthcode",
            type:"post",
            data:{"mobile":$("#mobile").val()},
            dataType:"json",
            success:function(data){
                console.log(data);
            }
        })
    }

    function submit(){
        $.ajax({
            url:"#(contextPath)/passport/save",
            type:"post",
            data:{"mobile":$("#mobile").val(),"authCode":"111111","password":$("#password").val()},
            dataType:"json",
            success:function(data){
                console.log(data);
            }
        })
    }


</script>
</body>
</html>